﻿<ion-view>
    <ion-header-bar align-title="center" class="bar-positive bar-header-black">
    <div class="buttons">
	 <button class="button button-icon icon ion-navicon" ng-click="toggleLeft()"></button>					
    </div>
    <h1 class="title">{{appTitle}}</h1>
    <div class="buttons">
      <button class="button button-icon icon ion-navicon" ng-click="toggleLeft()"></button>
  </div>
   </ion-header-bar>
    <ion-content>
       <ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>

        <div>
            <div class="home-nav">
                <div class="nav-buttons clearfix">
                
                    <div class="home-title">
                        <span>当前总共</span><i>（<span ng-bind="onlineCount">0</span>人在线）</i>

                    </div>
                    <a class="button button-icon icon ion-ios-help-outline new-room" ui-sref="<!--kf-->"></a>
				
					 <a class="button button-icon icon ion-ios-game-controller-b-outline help" href="http://www.xinsrc.com"></a>
				<a class="button button-icon  new-room"  ui-sref="kf" target="_blank">在线客服 </a>	
                </div>
            </div>
            <div class="home-north">
             
                <div class="home-n-bg-b"></div>
            </div>
            <div class="home-cover">
                <div class="wrapper">
                    <img src="img/home/banner.png">
                </div>
            </div>
        </div>

        <ion-list>
            <ion-item ng-repeat="gameType in gameTypes" class="game-group"
                      ng-if="rooms[gameType.key] && rooms[gameType.key].length">
                <div class="game-type-bar clearfix">
                    <div class="game-icon clearfix">
                        <img ng-src="img/home/{{gameType.properties.icon}}.png">
                        <span class="group-name">{{gameType.text}}</span>
                    </div>
                    <div class="group-collapse clearfix" ng-click="collapseRoomGroup(gameType.key)">
                        <i ng-class="{true: 'ion-ios-arrow-down', false: 'ion-ios-arrow-up', undefined: 'ion-ios-arrow-up'}[gameTypeHideStatus[gameType.key]]"></i>
                        <span>收起</span>
                    </div>
                </div>
                <div class="home-rooms" ng-show="!gameTypeHideStatus[gameType.key]" >
                    <div class="room-row clearfix" ng-repeat="row in rooms[gameType.key]">
                        <div class="home-room" ng-repeat="room in row" ng-click=join(room)>
                            <div class="home-room-out">
                                <div class="home-room-in">
                                    <div class="room-name">{{room.name}}</div>
                                    <div class="room-limit">
                                        <div>在线人数:{{room.position}}人</div>
                                        <div>限{{room.limitNum}}人</div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
				
				
            </ion-item>
        </ion-list><div class="home-cover">
                <div class="wrapper">
                    <img src="img/home/banner.png">
                </div>
            </div>
    </ion-content>
</ion-view>